﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace Wicresoft.EKA.AtriumWebService
{
    class XMLHelper
    {
        //public static string GetXML()
        //{

        //    //XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
        //    //ns.Add("books", "http://www.cpandl.com");
        //    //ns.Add("money", "http://atrium.bmc.com/2009/01/commonTest");

        //    //XmlSerializer newSr = new XmlSerializer(typeof(LoginInfoTest));
        //    XmlSerializer newSr = new XmlSerializer(typeof(Security));

        //    using (MemoryStream memStream = new MemoryStream(100))
        //    {

        //        //newSr.Serialize(memStream, new LoginInfoTest()
        //        //    {
        //        //        authentication = "Test"
        //        //    });

        //        newSr.Serialize(memStream, new Security()
        //        {
        //            usernameToken = new UsernameToken()
        //            {
        //                username = "admin",
        //                password = "Pass01!",
        //                //Username = "admin",
        //                //Password = "1Q2w3e4r",
        //                nonce = Guid.NewGuid().ToString(),
        //                //created = DateTime.Now.AddHours(1).

        //            }
        //        });

        //        //newSr.Serialize(memStream, new LoginInfoTest()
        //        //{
        //        //    authentication = "Test"
        //        //}, ns);

        //        return System.Text.Encoding.Default.GetString(memStream.ToArray());

        //    }

        //    return string.Empty;
        //}
    }
}
